//
//  shopDetailCell.m
//  cityStar
//
//  Created by joyban on 15-1-15.
//  Copyright (c) 2015年 tiny. All rights reserved.
//

#import "shoppingDetailCell.h"

@implementation shoppingDetailCell

+(CGFloat)heightOfTableCell
{
    return 350;
}

-(void)configWithShoppingMessage:(NSArray *)message
{
    NSArray *array = [[NSArray alloc]initWithArray:message];
    [self.heardImageOne sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://api.icszx.com/image/c/id/%@/w/246/h/190/m/0",array[0][@"image"]]] placeholderImage:[UIImage imageNamed:@"shangpu"]];
    self.NameLabelOne.text = array[0][@"name"];
    self.btnTouch1.tag = [array[0][@"id"] intValue];
    self.PriceLabel.text = [NSString stringWithFormat:@"￥%@",array[0][@"price"]];
    self.DistanceLabelOne.text = [NSString stringWithFormat:@"%@评",array[0][@"comment"]];
    
    [self.heardImageTwo sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://api.icszx.com/image/c/id/%@/w/246/h/190/m/0",array[1][@"image"]]] placeholderImage:[UIImage imageNamed:@"shangpu"]];
    self.NameLabelTwo.text = array[1][@"name"];
    self.btnTouch2.tag = [array[1][@"id"] intValue];
    self.PriceLabelTwo.text = [NSString stringWithFormat:@"￥%@",array[1][@"price"]];
    self.DistanceLabelTwo.text = [NSString stringWithFormat:@"%@评",array[1][@"comment"]];
    
    [self.heardImageThree sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://api.icszx.com/image/c/id/%@/w/246/h/190/m/0",array[2][@"image"]]] placeholderImage:[UIImage imageNamed:@"shangpu"]];
    self.NameLabelThree.text = array[2][@"name"];
    self.btnTouch3.tag = [array[2][@"id"] intValue];
    self.PriceLabelThree.text = [NSString stringWithFormat:@"￥%@",array[2][@"price"]];
    self.DistanceLabelThree.text = [NSString stringWithFormat:@"%@评",array[2][@"comment"]];
    
    [self.heardImageFour sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://api.icszx.com/image/c/id/%@/w/246/h/190/m/0",array[3][@"image"]]] placeholderImage:[UIImage imageNamed:@"shangpu"]];
    self.NameLabelFour.text = array[3][@"name"];
    self.btnTouch4.tag = [array[3][@"id"] intValue];
    self.PriceLabelFour.text = [NSString stringWithFormat:@"￥%@",array[3][@"price"]];
    self.DistanceLabelFour.text = [NSString stringWithFormat:@"%@评",array[3][@"comment"]];
}

- (void)awakeFromNib {
    self.btnView1.layer.borderColor = [UIColor colorWithWhite:0.710 alpha:1.000].CGColor;
    self.btnView1.layer.borderWidth = 0.5;
    self.btnView2.layer.borderColor = [UIColor colorWithWhite:0.710 alpha:1.000].CGColor;
    self.btnView2.layer.borderWidth = 0.5;
    self.btnView3.layer.borderColor = [UIColor colorWithWhite:0.710 alpha:1.000].CGColor;
    self.btnView3.layer.borderWidth = 0.5;
    self.btnView4.layer.borderColor = [UIColor colorWithWhite:0.710 alpha:1.000].CGColor;
    self.btnView4.layer.borderWidth = 0.5;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)Brandbtn_Action:(UIButton *)sender {
    [self.delegate senderBtnClick:sender];
}

@end
